Repository navigation
version.sh: include commit count since release tag in BUILD_TAG - #643
Conversation
Post-tag git builds currently emit <VERSION>-g<commit>, which gives Stage 2 updaters no way to order two builds of the same release and lets an older packaged build silently replace a newer running Stage 2 via aura-try. When v<VERSION> is an ancestor of HEAD and HEAD is ahead of it, emit <VERSION>-<count>-g<commit> (the git-describe distance format already accepted by the distributions' Stage 2 updater pattern). Exact release tags still emit <VERSION>, and builds without an ancestor v<VERSION> tag keep <VERSION>-g<commit>. Signed-off-by: Satya Benson <satya@benson.earth>
|
Merge readiness at
Areas: none matched in CODEOWNERS Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Ran all seven release-version cases at this commit. The count is emitted for a Git checkout descended from the release tag, including dirty builds, and exact tags and archive fallback keep their old format. The existing updater pattern accepts the counted tag. Keep the Stage 2 build and hardware checks on the counted image. Fedora’s source archives still emit uncounted tags, which needs handling in the Consumer PR #601.
|
Merging at |
Include the commit count since
v<VERSION>inversion.shso post-tag development builds emit<VERSION>-<count>-g<commit>(e.g.1.0.0b18-68-gd8eb8ad4) instead of<VERSION>-g<commit>.Why:
1.0.0b17-g5a244b5bvs1.0.0b17-gc0af820e) cannot be ordered by string or commit hash alone, so Stage 2 downgrade checks previously had to treat same-release builds as equal and allowed an older packaged build to replace a newer running Stage 2.UPDATER_PATTERN:-(?:[0-9]+-)?g[0-9a-f]+) already accepts an optional-<count>-segment, so older updaters and Stage 1 binaries continue parsing the tag unchanged.Changes:
version.shto count commits fromv<VERSION>..HEADwhenv<VERSION>is an ancestor ofHEADand emit<VERSION>-<count>-g<commit>whencount > 0(preserving exact release tags<VERSION>,AURA_VERSION_TAGoverrides, and<VERSION>-g<commit>fallback when no ancestor tag is present).test_version_sh_includes_commit_count_after_release_tagintests/python/test_release_version.py.Tested:
pytest tests/python/test_release_version.py(7 passed, including exact tag, post-tag commit count,-dirty, missing ancestor tag, andUPDATER_PATTERNmatching)./version.shoutput on currentmain(#define BUILD_TAG "1.0.0b18-68-gd8eb8ad4")Risk: two-way · Aura post-tag
BUILD_TAGstring only. Exact release tags andAURA_VERSION_TAGoverrides are unchanged, and the emitted string matches the existing Stage 2 updater pattern.